<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of HouseModel
 *
 * @author wangnaixin
 */
namespace Admin\Model;
use Think\Model;
class AdverPlaceModel  extends Model {
    //put your code here
    protected  $tableName = 'adver_place';
    //获取广告列表
    public function getadvPlaceList($where=array()){
        $data = $this->where($where)->order('position')->select();
    /* echo '<pre>';
        var_dump($data);die();*/
        return $data;

    }
    //删除广告
    public function delAdvp($advpId,$data=array()){

        return $this->where("id = ".$advpId)->save($data);
    }
    //编辑广告
    public function getAdvPlaceInfoById($advpId){
        return $this->where("id = ".$advpId)->find();
    }
}